third commit of tip calc