added read func.