added mode to header