Included code to turn ticketHeader into factor (see line 92)