added function to di + doc
merged