refactored sortable