modified purge_inbreeding