add extra api from aalib, add export function