added getvalueordefault