refactoring dashboard show page