re-add write method