Add method refactored to pass tests