first working code to record function prototypes and find a function def