added register and check_register