changes to make ag3 work