made tests with variations of generic types, still plenty of room to improve