Added assert statements.