implemented update-profile function