working on global api