added some io methods