made read-part function