extracted api to core