add rubocop check; fix some code to pass the check