added gamma correction