moved basic stats in separate module and added test function