switches a and b