first draft
added performance stats and cleaned up code
small fix on divisor on check_value
Merge pull request #3 from bensinober/master

Improvements made by bensinober