correct S-function