add document for weighted sum functions