while demand > supply sell() restock() while supply > demand then buy()