added assignment check on var initialization