formatting and extra end