Added add function and test.