remove unused 'code' from add_registration