add write, resize