Refactor of add method and new edge case tested