refacting aoi package