handles when table doesn't have <th> IF the headers are provided as argument