started refactoring to work with generic lists.