fixed statistics, added start and end period