improved agformat