replace sequence of if-else statements with MagicTargetFilterParser
rearrange cases in MagicTargetFilterParser