add getAttribute, reveal attribute index in doc