minor tweaks to get the api working