fleshed out query, submit calls correctly