cleaned comment and renamed append format to d