Use simpler code
DRY up table