ported search[code] to spice2