adapted to new attribute API