simplifying the write