added a method called getNumLives