got IO to work a bit better