reorg to support more types