First working read version. Not working write version