remove duplication in command/query methods.

not sure if this is better but trying it out to see how it feels.