Added calculateDiscount method