formatting and ending