update core algorithm