Modified API.  Draft of final version