new class from reading data from a file