attempting to split up actions to reduce branching