Updated data.php to include monthstats function