adjusting balance algorithm