Converted tip function to return format.