Add input testing, to_table function which return correct number of rows and columns