fixed silly mistake of variable and function names