Search function now works