bae env with yaf & smarty code