made things static, changed DS to maps in AI functions