New version of weighted degree