Completed split add function