modify getattributes method.