changing search function