refactored duplicity into service