fixed a typo in var and function names