modified search a bit