updated table function names and added comments