modified empty bid searching function