inbetween search implementation