r2SCAN subroutines