change type of variable 'g' to vec3