Used generics with map