change some types from int to double for some statistic data fields
calc service ready for testing
refactoring and queries missed on previous commit
fix merge