added ticket number generation functionality