reads from stdin