changes from alib shared agree library