refactor for cojoko conversion