added test to assignment using previous variables