API + tests