added GA code as well as did some minor edits