refactored dashboard template