added some constants
new method and members for statistics calculation
restructured statistics calculation