updated allocate and free block