added if statements in get_header