replacing deprecated assert class