started breaking out common functions before implementing new commands