implemented search contract