added get and getbyemail functions