normalizeDocLength added (I don't know if this is usefull but it was in
juanmi's code so I wanted to try it....