Switch the logic