factor out sign character to reduce logic size, fix weird syntax issue of declaring variable in case block by wrapping the block in curly braces
factor out sign character to reduce logic size, fix weird syntax issue of declaring variable in case block by wrapping the block in curly braces

doemput/CinyTest,drmonkeysee/CinyTest