implement all_answered function