created a primitive 'read data from file' version