Added var totalAmount