Add rvm emulation function