add table function in the environment