add train code