made abf more efficient and ensured data size is fixed throughout