Change API, add new tests