added ifs for the YAML header