changed api to be more consistent with other projects