fixed variable name
added a test