hill climbing tuning, and testing. Hans code re-added