starting to adapt the IF functions to SC data