added assertions.