a little refactoring of SMC