added an option to pass a header string