refactored statistics and added geometry class