fix tests
fix var declaration