import some stuff from aep

Change-Id: I2e40855dd5ce6bc2c9fb2b0b15146763feee73a7