moving some api functions around.