move register device to helper