edited for clearity