refactored previous post into two; large-scale edits.