updated test for add function