Implement _indexAdd
port some methods