added check_ticket functionality