Updating 'which' so it's more generic and handles not having the '-s' switch