Refactoring: Remove Assignments to Parameters

the variables that came in as parameters shouldn't be reassingned
because java is pass by value only and may cause unnecessary confusion
Refactoring: extracting methods
Design pattern: State