added useful fns for AGModel