handle devices as an array