added some io stuff