add function: trim modules
add function: extend_modules_by_deps