method matching and cleanup