refactor dashboard