fix/write tests