cleaned up and got working graph for stats page