refactoring dashboard helper