initial commit of switchres, from 2011