removed internal asserts to optimize