checkAFKs function