change mobile commons optin function into three different functions