SoFunction optimization