updating profile functionality