rename gates_calc