added search and query support on both routes