Added checking for dayly/weekly/monthly