refactored 'add' method to make more clear