add tests crossing maximum, issue #147