merge the two module and clean the code