update assert function