updated the library to take in header parameters