Local variable assignment refactoring

Local variable assignment refactoring