new function in 'handy' to fetch query from URI