update code for getting appid...