The present invention relates to compounds of formula (I) useful as selective inhibitors of JAK2 kinase. The invention also provides pharmaceutical acceptable compositions comprising said compounds and methods of using the compositions in the treatment of various diseases, conditions or disorders. The invention also provides processes for preparing the compounds of the invention.