added clearTable() function