generate and use is_X_Register function