Scaling pseudocode