update2

added auto register method