heap errors.  majority commented out