refact modules