NEXT: type recognition magic