beautify, clarify, fix potentially bad logic path