Add function viewprofile and edit