added test for from_dataset