attrribute documentation, refactoring of boundary indexing