Added a test and updated code to pass.