new generelization algorithm
update documentation