added lib and api