implemented updateMyBitfield() and sendPiece()