changes to add assert functions