Search function working, want to improve