up weight algorithm