improving scoreDef attribute handling