improve readability in dataset and test_dataset classes