modularize: error, rename vars