Worked on the add function