refactor to two convert methods