breaking out more common integer functions into common utilities