from function changed to table