Add isRunning function