fixed output 2 sort glitch and added end message