reads from streams