added order type functionality, saves to database