Don't use which, use type instead.