added implementation of updateBitfield()