Corrections and debugging Complete

Sweet. I have a function that calculates and a ternary that functions
properly.