rewrite2 add registration (thanks mobile app!)