add indexing operators
make sure to handle 1D indexing properly.
do not forget to free the temporary size allocation.
add documentation
correct the heading style in the doc for index operations.