added a function to handle function names