improved switching and other things