added debug assertions by the truckload