added switching iteration algorithms