revised tests and guard clauses based on payload action structure