fixed variable name and removed test code