fix switch bugs
fix elimination bugs