backend for java trains