separate io from messages