refactor get user profiles api