refactor to parts called explicitly