function editprofile & buy