optimize aem model