added rescaling based on proportion