Design of a radiation tolerant CMOS image sensor