updated files from email on Aug 16, update curVal and training functions

merging files emailed on aug 16