support reading data from file