added feature to fetch prefixes from query string