extended functionality beyond tables, should break this up probably