searchfunction completed