tidying up the API