updated code to latest version of Ga