add search function for spl to search by all value of fields, also done with some refactoring