map can now also return its type