added add function and assert function