avoid polluting the main object with switch definitions