fix func read()