refactor dashboard view