clean up
added the ability to write partial responses

this was done in order to improve performance on writing big files