moved read to standard library