I seem to be having trouble with getting the conditional calculations to work