testing register method