Let's use a flag instead of a switch