Added api, closes #12