[FIX] compute weight