use query instead of hash