clean up api