everything works except for the search bar and sort array