End date added to train network function