updated codeclimate code