converted to javascript, removed subtotal var