added writing test