fixing bug in cmd calculation
Merge pull request #7 from pophealth/cmd_fix

fixes bug in cmd calculation