swf w/o EI.availavle added. switch/case changed to if/else