Removed read since it doesn't work when the script is piped as input