tidy up a bit

check if device is permitted