checking headers and env