Added code for Method 2 of detecting green.