Added tablePosition variable