updated dashboard code