Added searching code