added var keyword, repaired test for localhost