refactor(api): work on copy of object rather than object itself

prevent modifying original tag objects