organized dashboard code