corrected errors after pull request test failed
corrected programming errors related to deduction calculation