move variable assignment to initialize