sort functionality update
put comments to the new code
fix search filter