preallocation of variables
small update of the documentation