afn done, need to check the process function to correct it  without damaging the afd function
afn + afd working :D