added pruning and enriching, code still contains an error because in some polymers a big jump occurs at some w
point when adding the bead