added saving capability