Updated new orders function