script for ticket conversion