improvement on price set algorithm