adds search implementation and test