implements dependencyinjection in search