Finding the function from a table