Added more control over training size