implemented first part of buildAODict