reading directly from file