unused function cleanup
refactor to more self-explaining names