             // store SampleData as ID:0 in the file
             // ID:0 is a reserved ID and should not be availabled for public access
             var header = ObjectStoreHeader(used: false)
-            self.writeHeader(&header)
+            self.writeHeader(header)
             
             let sampleData = O()
-            self.writeData(sampleData.data, atPos: CUnsignedLongLong(self.fileOffset))
+            self.writeData(sampleData.data)
             
         } else {
             let pos = calculatePos(1)

    
    func addObject(aObj: O) -> UID {
        
        var pos = register()
        var uid = calculateID(pos)
    
        self.writeData(aObj.data, atPos: pos)
        
        aObj.uid = uid
        aObj.dirty = false

        if !aObj.uid {
            // only NEW object have a nil uid
            
            var pos  = self.registerBlock()
            result = self.calculateID(pos)
            aObj.uid = result
            
