implemented API, but routing still weird