fix pt_min pt_max to work with None, which is no longer considered ordered in python3
fix hammer example for python3
use integer division