expose write function to import