added @SuppressWarning for deprectated useregistr