implemented the hill climber