Compounds of the formula I:or pharmaceutically acceptable salts thereof,wherein m, n, p, q, Ar, A, W, X1, X2, X3, X4, R1, R2, R3, R4, R5, R6, R7, R8, R9, R10 and R11 are as defined herein. Also disclosed are methods of making the compounds and using the compounds for treatment of inflammatory diseases such as arthritis.