calculate_discount(id) method added to Home Controller