update to read stdin