Added some code and a test