added setHeaders method