tested and debugged normal demand distr