refactor codes by suggestions of rubocop
add SimpleCov, to check test coverage.