eliminated two switches