sgirle: convert to refcounted frames