modify write method