Sf optimization