refined getUserProfile based on comments in code review