update

add assert()  treatment of NULL pointer