move core.API to libAPI