refactoring user profile template