moving tableContains function.