changed model, added javascript for buy and sell