adding sorting to pvs
before adding sorting
added random feature (type ./squared help for info)