Update gamma

change if structure for direct mapping