added setBitfield method, modified receivePiece