putting in asserts to catch test errors; also commenting out some unused code