Refactored add method to remove unnecessary if statement