add extra credit func