fix some spacing and use query instead of q for readability