added some read functions.