实现了write