added head check in goodness