add assertion function