library to detect when a function gets called recursively