add search emulation code