Added relevent code and data I used to create the story. It is not the prettyist code but it worked.