moved code

Table is working now