added g4 code