refactoring user dashboard