added code to process tip data