Modified the ascstats function