refactor
add logs (close #2)