isolated the location of error to four lines.  Need to check my math.