apply user profile changes and refactoring