- fix sort function
- cleanup