v1.02 added reading from file