initialize to optimize for toidict