added function to take the tablename as header