updated to included the hill climbing algorithm