added hasConstant, getConstant