Implemented explore f'n in optimize