adding device detection utility script