Implemented function to read by datasets