setup and write is working