update rvm loading, common functions