made my code simpler by using the searchcomponent to make a comparepage