Added problem spaces, returned too early in writing training data