not perfect but at least the /api thing works