read from a file class