now can train with a user-supplied dataset as well