Task1 rewritten to type-lookup