added some dashboard logic