better/safer error handling
add getHeader()