added cwFunctions (scanning modal)