Should only call search on end