flag_spam_karger function is in