first version, api and simple tests