completed add function