Modify the return type of runAction function