improved monthly & yearly stats calculation