added functionality to ValidateDataDirection
added DetermineBG_Orientation