remove unused parameter
remove useless match
remove warning for variable exported from case