fixing 'attribute-defined-outside-init'