add loop for multiple headers