renamed variable
refactored method sort