use sequences in 'when' for readability