almost done with simple switching