refactoring dasdhboard helper