optimize attrs