write and read values maybe works now