initial code commit

added first rev of API
documentation in README next commit