     var buffersCount:Int
     var buffersIndex:Int = 0
     var buffersSemaphore:dispatch_semaphore_t?
-    var buffers: [Buffer] = []
+    var buffers: [EncodableBuffer] = []
     
-    required init(device:MTLDevice, bytecount:Int, buffersCount:Int = 1, options: MTLResourceOptions = .StorageModeManaged) {
+    required init(device:MTLDevice, bytecount:Int, buffersCount:Int = 1, options: MTLResourceOptions = .CPUCacheModeDefaultCache) {
         self.bytecount = bytecount
         self.buffersCount = buffersCount
         prepareBuffer(device, options: options)
     }
     
     func prepareBuffer(device:MTLDevice, options:MTLResourceOptions) {
-        let singleBuffer = BaseBuffer()
+        let singleBuffer = BaseEncodableBuffer()
         singleBuffer.bytecount = bytecount
         singleBuffer.prepareBuffer(device, options: options)
         buffers = [singleBuffer]

    var buffersCount:Int { get set }
    var buffersIndex:Int { get set }
    var buffersSemaphore:dispatch_semaphore_t? { get set }
    var buffers: [Buffer] { get set } // private
    
    // N.B. must deinit resources!
    
    init(device: MTLDevice, bytecount: Int, buffersCount: Int, options: MTLResourceOptions)
    func prepareBufferPool(device: MTLDevice, bytecount: Int, options: MTLResourceOptions)
    func prepareBufferPool(device: MTLDevice, bytecount: Int, options: MTLResourceOptions, createWith: (Self) -> Buffer)
    func createBuffer(device: MTLDevice, bytecount: Int, options: MTLResourceOptions) -> Buffer
    func createBuffer(device: MTLDevice, bytecount: Int, options: MTLResourceOptions, createWith: (Self) -> Buffer) -> Buffer
    func releaseBuffer(numBuffers:Int)
    
    func getBuffer() -> Buffer
}

extension BufferPool {

        return buffer
    }
    
    func createBuffer(device: MTLDevice, bytecount: Int, options: MTLResourceOptions) -> EncodableBuffer {
        let thisBuffer = BaseEncodableBuffer()
        thisBuffer.bytecount = self.bytecount
        thisBuffer.prepareBuffer(device, options: options)
        return thisBuffer
    }
    
    func createBuffer(device: MTLDevice, bytecount: Int, options: MTLResourceOptions, createWith: (Self) -> EncodableBuffer) -> EncodableBuffer {
        return createWith(self)
    }
}
