move stuff to api