add GA code, closes #20