wrapping trains array in object