Implemented  the proper demand model