Added the first bits of a search function