added 7 and 30 day calculations for home page