add support for nearest train search