added saving to remote and modal