refactoring of dashboard