Make the code more flexible
add a modul for calculatiing the duplication