added smpmode and gasmode functions