detect more forms of modulo expressions when extracting a function