fixed clustering bug
persistence fully works
examples are inline with the new code