do you mean call clear() inside first line inside read() ?