added functionality to agdrift