make tip_calculator work with defined variables