revising api (issue #4)