refactor out direct calls to zen functions