Changed return data type from int to bool for setValue() and addValue().