prepare code for mods chaining