Built the search functions (doesn't work yet)