Library to house calcCMD's logic