added read time support. (but inefficient)