adding API stuff, broken