migrate non core functionality from api to library