deleteTable function