Fix error cannot find symbol

solved cannot find variables. I think it should such to optimize code.