core-4802 refactor code to allow arbitrary status