cleaned up register_form