Code works except the searching part needs to fix