sorting pol graphs