type params refactoring
fix conflict variable 'log' and function