add completion listener to save previous result
completion and tests
Change tests: exclude invocation_count parameter