does this compile?  I don't see how write is in scope.