fixed custom headers and removed print statements