Fix the names of the variables to their correct names and add a test.rb file to test the code.