handler for history and ticket