much simpler logic without requiring a branch condition