corrected else statment in add()