cleaned up code - more consistant - added error message to myprofile