update code - remove debug code for reset cost