added sort by feature