add appid argument for init method