refactor : use table instead of list