pass where values to the helper function rather than rely on internal state
save the where values in variables so we don't need to look them up all
the time
change method name to reflect what it actually does.
eliminate some conditionals