implemented free_block and allocate_block