refactoring dashboard view