added aliveDetected in functions of App.scala