updated doc + clean function