Resize based on output value