trying to fix not defined issue on codeclimate