how to change MChain constructor so that it collects chains of type x?