added functions: isQuit and transaction