changed arrays to obj for red and green