added block allocation to allocate()
added acquisition parts
memory problems on readData()