This really feels like you repeatedly copied the same code. I'm not sure this is the way to do this, if you could help clarify that would be great.