Now the listener is activated as soon as the trainsMonitor object is created