small clean up, add assert too