some scripts needed for the HSCP search