making search function split