Added first function to the code.

added an anonymous function to my code to solve for subtotal.