refactor to reduce superfluous API functions/steps