broke detector.scala in separate files