fixing code smell for codeclimate.com