factor out common integer manipulation functions
rename folders for groc