added saving and updating capability