Update stats task to accept timestamp
Add statistics model