seperating out the ssearch parsing from the chaining so it is clearer what is happening.