You should be using generics here.