fixes #10
#16 add api
fixes #16