write() is replaced with write.asModule()