added three gamma case