refactoring
add logger