improved auto registration