Compounds of formula wherein R 1 is substituted phenyl, substituted phenyl-C 1-6 -alkyl, substituted phenoxy-C 1-6 -alkyl, substituted phenyl-C 2-6 -alkenyl, substituted phenyl-C 2-6 -alkynyl, substituted pyridinyl, substituted pyridinyl-C 1-6 -alkyl, substituted pyridinyl-C 2-6 -alkenyl, substituted pyridinyl-C 2-6 -alkynyl, substituted thiophenyl, substituted thiophenyl-C 1-6 -alkyl, substituted thiophenyl-C 2-6 -alkenyl or substituted thiophenyl-C 2-6 -alkynyl, wherein substituted phenyl, substituted phenyl-C 1-6 -alkyl, substituted phenoxy-C 1-6 -alkyl, substituted phenyl-C 2-6 -alkenyl, substituted phenyl-C 2-6 -alkynyl, substituted pyridinyl, substituted pyridinyl-C 1-6 -alkyl, substituted pyridinyl-C 2-6 -alkenyl, substituted pyridinyl-C 2-6 -alkynyl, substituted thiophenyl, substituted thiophenyl-C 1-6 -alkyl, substituted thiophenyl-C 2-6 -alkenyl and substituted thiophenyl-C 2-6 -alkynyl are substituted by R 3, R 4 and R 5; Y is -OC - or -C -; W is -C -, -S 2 - or -CR 6 R 7 -; R 2 is substituted phenyl, substituted pyridinyl or substituted thiophenyl, wherein substituted phenyl, substituted pyridinyl and substituted thiophenyl are substituted by R 6, R 7 and R 8; R 3 is halogen, hydroxy, cyano, C 1-6 -alkyl, C 1-6 -alkoxy, C 1-6 -alkoxy-C 1-6 -alkyl, halo-C 1-6 -alkoxy, halo-C 1-6 -alkyl, hydroxy-C 1-6 -alkyl, C 3-8 -cycloalkyl, C 3-8 -cycloalkyl-C 1-6 -alkyl, C 3-8 -cycloalkyl-C 1-6 -alkoxy, C 3-8 -cycloalkoxy, C 3-8 -cycloalkoxy-C 1-6 -alkyl, C 1-6 -alkylamino, C 1-6 -alkylcarbonylamino, C 3-8 -cycloalkylcarbonylamino, C 1-6 -alkyltetrazolyl, C 1-6 -alkyltetrazolyl-C 1-6 -alkyl or heterocycloalkyl-C 1-6 -alkoxy; R 4 and R 5 are independently selected from H, halogen, hydroxy, cyano, C 1-6 -alkyl, C 1-6 -alkoxy, C 1-6 -alkoxy-C 1-6 -alkyl, halo-C 1-6 -alkoxy, halo-C 1-6 -alkyl, hydroxy-C 1-6 -alkyl, C 3-8 -cycloalkyl, C 3-8 -cycloalkyl-C 1-6 -alkyl, C 3-8 -cycloalkyl-C 1-6 -alkoxy, C 3-8 -cycloalkoxy, C 3-8 -cycloalkoxy-C 1-6 -alkyl, C 1-6 -alkylcarbonylamino, C 3-8 -cycloalkylcarbonylamino, C 1-6 -alkyltetrazolyl, C 1-6 -alkyltetrazolyl-C 1-6 -alkyl or heterocycloalkyl-C 1-6 -alkoxy; R 6 is aminosulfonyl; R 7 and R 8 are independently selected from H, halogen, hydroxy, cyano, C 1-6 -alkyl, C 1-6 -alkoxy, C 1-6 -alkoxy-C 1-6 -alkyl, halo-C 1-6 -alkoxy, halo-C 1-6 -alkyl, hydroxy-C 1-6 -alkyl, C 3-8 -cycloalkyl, C 3-8 -cycloalkyl-C 1-6 -alkyl, C 3-8 -cycloalkyl-C 1-6 -alkoxy, C 3-8 -cycloalkoxy and C 3-8 -cycloalkoxy-C 1-6 -alkyl; R 9 is C 1-6 -alkyl, C 1-6 -alkoxy or halogen; m, n, p and q are independently selected from 1 or 2; or pharmaceutically acceptable salts. R 1 is substituted phenyl, substituted phenyl-C 1-6 -alkyl, substituted phenoxy-C 1-6 -alkyl, substituted phenyl-C 2-6 -alkenyl, substituted phenyl-C 2-6 -alkynyl, substituted pyridinyl, substituted pyridinyl-C 1-6 -alkyl, substituted pyridinyl-C 2-6 -alkenyl, substituted pyridinyl-C 2-6 -alkynyl, substituted thiophenyl, substituted thiophenyl-C 1-6 -alkyl, substituted thiophenyl-C 2-6 -alkenyl or substituted thiophenyl-C 2-6 -alkynyl, wherein substituted phenyl, substituted phenyl-C 1-6 -alkyl, substituted phenoxy-C 1-6 -alkyl, substituted phenyl-C 2-6 -alkenyl, substituted phenyl-C 2-6 -alkynyl, substituted pyridinyl, substituted pyridinyl-C 1-6 -alkyl, substituted pyridinyl-C 2-6 -alkenyl, substituted pyridinyl-C 2-6 -alkynyl, substituted thiophenyl, substituted thiophenyl-C 1-6 -alkyl, substituted thiophenyl-C 2-6 -alkenyl and substituted thiophenyl-C 2-6 -alkynyl are substituted by R 3, R 4 and R 5; Y is -OC - or -C -; W is -C -, -S 2 - or -CR 6 R 7 -; R 2 is substituted phenyl, substituted pyridinyl or substituted thiophenyl, wherein substituted phenyl, substituted pyridinyl and substituted thiophenyl are substituted by R 6, R 7 and R 8; R 3 is halogen, hydroxy, cyano, C 1-6 -alkyl, C 1-6 -alkoxy, C 1-6 -alkoxy-C 1-6 -alkyl, halo-C 1-6 -alkoxy, halo-C 1-6 -alkyl, hydroxy-C 1-6 -alkyl, C 3-8 -cycloalkyl, C 3-8 -cycloalkyl-C 1-6 -alkyl, C 3-8 -cycloalkyl-C 1-6 -alkoxy, C 3-8 -cycloalkoxy, C 3-8 -cycloalkoxy-C 1-6 -alkyl, C 1-6 -alkylamino, C 1-6 -alkylcarbonylamino, C 3-8 -cycloalkylcarbonylamino, C 1-6 -alkyltetrazolyl, C 1-6 -alkyltetrazolyl-C 1-6 -alkyl or heterocycloalkyl-C 1-6 -alkoxy; R 4 and R 5 are independently selected from H, halogen, hydroxy, cyano, C 1-6 -alkyl, C 1-6 -alkoxy, C 1-6 -alkoxy-C 1-6 -alkyl, halo-C 1-6 -alkoxy, halo-C 1-6 -alkyl, hydroxy-C 1-6 -alkyl, C 3-8 -cycloalkyl, C 3-8 -cycloalkyl-C 1-6 -alkyl, C 3-8 -cycloalkyl-C 1-6 -alkoxy, C 3-8 -cycloalkoxy, C 3-8 -cycloalkoxy-C 1-6 -alkyl, C 1-6 -alkylcarbonylamino, C 3-8 -cycloalkylcarbonylamino, C 1-6 -alkyltetrazolyl, C 1-6 -alkyltetrazolyl-C 1-6 -alkyl or heterocycloalkyl-C 1-6 -alkoxy; R 6 is aminosulfonyl; R 7 and R 8 are independently selected from H, halogen, hydroxy, cyano, C 1-6 -alkyl, C 1-6 -alkoxy, C 1-6 -alkoxy-C 1-6 -alkyl, halo-C 1-6 -alkoxy, halo-C 1-6 -alkyl, hydroxy-C 1-6 -alkyl, C 3-8 -cycloalkyl, C 3-8 -cycloalkyl-C 1-6 -alkyl, C 3-8 -cycloalkyl-C 1-6 -alkoxy, C 3-8 -cycloalkoxy and C 3-8 -cycloalkoxy-C 1-6 -alkyl; R 9 is C 1-6 -alkyl, C 1-6 -alkoxy or halogen; m, n, p and q are independently selected from 1 or 2;