delete duplicate def PatternFunc