moved some code around
statistics manager