Fixed green detection
Actual working program restored