Add document to functions