created the code into a gem