wip table= its refactored, but indices are not right