test passed and variable issues fixed