slight refactor and line cleanup