updated hill climb to accept function parameters