added a function toArrayOffset and wrote some more general documentation