update code for creating new orders in a table