change jquery to cdn, subtraction logic

change jquery to cdn, subtraction logic on how to correctly build up
tables for different subtraction scenarios