fixing the issue with class variables is inheritance