alloc_bs implemented