cleaning up writing tuples