got the variable assignment working right