second commit of tip calc