code reduction of weighted pred