removed recursive explore function