extracted minst reading func