Added update cloth function