improvement of pricing algorithm