completed the first version of the parameterized search