take device id if it is passed in