done writing and formating