working on Acyclic function