added idf, if-idf functions