Added approach 8:  Use generics more extensively