added G namespace fixed some stuff