add bg_register_middle