implement first search