update graident length