Use which instead of type