enchanced search function