use "command -v" instead of which