refactor, rename, and highlight parts I don't quite get