minor code cleanups
return empty result when no devices are given