better code for a better dashboard