New code added with query as prefix