added write test