seperating lib and c_api