reads input files