remove all empty lines
sort methof now functioning
explanation of method sort