Working implementation of API.