tip calculator for codepath class