Added isAlive() function.