Support for primary device. Removed duplicated function.