add writable callback