started on write() function