small changes to order functionality