added the parse-fundef function to assignment 2