updated code for editing user profile