statistics very close to work (accepted). need to clean-up code