change path and expand search pattern