add comments
move encode of query to QueryArgs