Changes to program function

I re-read the assignment before submission and realized that the
requirements were slightly different than I remembered. It was a quick
fix, this is the change.