Central switching function