add ConstantDict and enhance unit tests