Changed isGood from boolean to int