Adding the extended search functionality