GA code, this closes #5