I wouldn't name my variable "var" because that is a reserved keyword. Not sure if that's the problem, though.