added  functionality for editing orders