finished implementing search