make different scripts into modules, ready to be merged