device must be an integer