update state machine to function with approach/search with precached (tested outside)
Merge branches 'qwerty' and 'version3' into qwerty