Added emailCheck function