update readme and mv write to function