refacting

switch ok
update case

refactor if