The present invention provides compounds of formula (I) and pharmaceutically acceptable salts thereof. The formula I compounds inhibit tyrosine kinase activity of JAK3, thereby making them useful for the treatment of inflammatory and autoimmune diseases.