Where are the definitions of good and bad? Perhaps the compiler cannot see them. Is this the entire code you posted or just a fragment?

Jerson