first version of amap directive