variable renames for understanding
removed dead code
changed constant assignment to be left side