updated init with device id