Refactor add()