add buy ticket function