added/fixed edit profile function