Updated new orders fucntion