accounted for second edge case