A compound of the formula: wherein X is oxygen or sulfur; R 1 and R 2 taken together with the carbon atom to which they are attached form a C 3-8 cycloalkyl or heterocyclyl ring wherein said cycloalkyl and heterocyclyl rings are optionally substituted with one or two substituents independently selected from the group consisting of R 6, C 1-6 haloalkyl and halo; Each R 3 is independently selected from the group consisting of hydrogen, halo and C 1-2 alkyl, wherein said alkyl group is optionally substituted with one to three halo; or two R 3 groups can be taken together with the carbon atom to which they are attached to form a C 3-4 cycloalkyl ring, wherein said ring is optionally substituted with one to three halo; R 4 is hydrogen, C 1-6 alkyl, C 2-6 alkenyl, C 2-3 alkynyl, NR 6 R 7, OR 6, OR 8 or R 8 wherein said alkyl groups are optionally substituted with one to six substituents independently selected from the group consisting of OR 7, halo, hydroxy, cyano and R 8; R 5 is heteroaryl, heterocyclyl, C NR 6 R 8, C R 8 or NR 6 C OR 7, wherein said heteroaryl and heterocyclyl groups are optionally substituted with one to five substituents independently selected from the group consisting of C 1-6 alkyl, halo, oxo, cyano, C 1-6 haloalkyl and SO m R 6; R 6 is hydrogen or C 1-6 alkyl which is optionally substituted with one to three substituents independently selected from the group consisting of halo, hydroxy, cyano and O(C 1-6 alkyl); R 7 is hydrogen or C 1-6 alkyl which is optionally substituted with one to three substituents independently selected from the group consisting of halo, hydroxy, cyano and O(C 1-6 alkyl); R 8 is C 3-8 cycloalkyl, aryl, heteroaryl or heterocyclyl, wherein said cycloalkyl, aryl, heteroaryl and heterocyclyl groups are optionally substituted with one to four substituents independently selected from the group consisting of halo, cyano, oxo, C 1-6 haloalkyl, R 6, OR 6, C 3-6 cycloalkyl, aryl, heteroaryl, heterocyclyl, SO m R 6 and SF 5; m is an integer from zero to two; p is an integer from zero to two; or a pharmaceutically acceptable salt thereof. wherein X is oxygen or sulfur; R 1 and R 2 taken together with the carbon atom to which they are attached form a C 3-8 cycloalkyl or heterocyclyl ring wherein said cycloalkyl and heterocyclyl rings are optionally substituted with one or two substituents independently selected from the group consisting of R 6, C 1-6 haloalkyl and halo; Each R 3 is independently selected from the group consisting of hydrogen, halo and C 1-2 alkyl, wherein said alkyl group is optionally substituted with one to three halo; or two R 3 groups can be taken together with the carbon atom to which they are attached to form a C 3-4 cycloalkyl ring, wherein said ring is optionally substituted with one to three halo; R 4 is hydrogen, C 1-6 alkyl, C 2-6 alkenyl, C 2-3 alkynyl, NR 6 R 7, OR 6, OR 8 or R 8 wherein said alkyl groups are optionally substituted with one to six substituents independently selected from the group consisting of OR 7, halo, hydroxy, cyano and R 8; R 5 is heteroaryl, heterocyclyl, C NR 6 R 8, C R 8 or NR 6 C OR 7, wherein said heteroaryl and heterocyclyl groups are optionally substituted with one to five substituents independently selected from the group consisting of C 1-6 alkyl, halo, oxo, cyano, C 1-6 haloalkyl and SO m R 6; R 6 is hydrogen or C 1-6 alkyl which is optionally substituted with one to three substituents independently selected from the group consisting of halo, hydroxy, cyano and O(C 1-6 alkyl); R 7 is hydrogen or C 1-6 alkyl which is optionally substituted with one to three substituents independently selected from the group consisting of halo, hydroxy, cyano and O(C 1-6 alkyl); R 8 is C 3-8 cycloalkyl, aryl, heteroaryl or heterocyclyl, wherein said cycloalkyl, aryl, heteroaryl and heterocyclyl groups are optionally substituted with one to four substituents independently selected from the group consisting of halo, cyano, oxo, C 1-6 haloalkyl, R 6, OR 6, C 3-6 cycloalkyl, aryl, heteroaryl, heterocyclyl, SO m R 6 and SF 5; m is an integer from zero to two; p is an integer from zero to two; or a pharmaceutically acceptable salt thereof.