added cuda grid for i