allow passing arbitrary number of arguments to write() and end()