clean up linking api