clean a bit the api