documented add function