moved write command