code for research on pricing problem