refactoring stored proc command building (#21)