tip calculator for codepath