several parameter validations and Debug.Asserts