add the function to change the order to the pending state