add assert function.